<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'myUsedCarSaleInfo.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="css/usedcar.css">
	
		<script type="text/javascript">
			function deleteBut(id){
				if(window.confirm('确认删除?')){
					window.location = "usedcar/viewSaleUsedCar_deleteMyUsedCarSale?id=" + id;
                 return true;
              }else{
                 return false;
            	 }
			}
			
			function init(){
				if("${request.isDelete}" )
					alert("删除成功!");
				if("${request.isAlter}")
					alter("修改成功!");
			}
			
		</script>
	
  </head>
  
  <body onload="init()">
    <div id="main">
    	<label  style="font-size: 18px;font-weight: bold;" >我发布的出售信息</label><br/>
    	<div style="width: 900px;text-align: center;">
    	<c:if test="${request.size == 0}">没有记录!</c:if>
    	</div>
    	<table class="tbimg" cellpadding="0" cellspacing="0">
			<s:iterator value="#request.usedCarSaleList" var="usedCar">	
				<tr onmouseover="this.style.background='#FFE4D2'"
						onmouseout="this.style.background='#FFF'">
						<td class="img">
							<a href="usedcar/viewSaleUsedCar_showSaleInfo?id=${usedCar.id}" rel="nofollow" target="_blank"><img src="${usedCar.imageUrl}"/> </a>
						</td>
						<td class="t">
							<a href="usedcar/viewSaleUsedCar_showSaleInfo?id=${usedCar.id}" target="_blank" class="t"><s:property value="#usedCar.title" /></a>
							<br />
							<s:property value="#usedCar.intro" />
							<br />
							排量<s:property value="#usedCar.dispalcement" />升
							<span class='c_ccc'>/</span><fmt:formatDate value="${usedCar.buyDate}" pattern="yyyy年MM月" />
							<span class='c_ccc'>/</span>
							<s:property value="#usedCar.mileage" />
							万公里
						</td>
						<td class="tc">
							<b class='pri'><s:property value="#usedCar.money" /></b> 万元
						</td>
						<td>
							<!--  <a href="">修改</a>&nbsp;&nbsp;&nbsp;&nbsp;-->
							<a href="javascript:void(0);" onclick="deleteBut('${usedCar.id}')">删除</a>
						</td>
					</tr>
				</s:iterator>
			</table>
    	
    </div>
  </body>
</html>
